//    Copyright (C) Kherty.  All rights reserved.
using System;
using OpenLS.Spreadsheet.Drawing;

namespace OpenLS.Spreadsheet
{
    class RemovedAnchorUndoUnit : AnchorUndoUnit
    {
        public RemovedAnchorUndoUnit(Worksheet worksheet, Anchor anchor, int index) : base(worksheet, anchor)
        {
            Index = index;
        }

        private readonly int Index;
        public override void Do()
        {
            Worksheet.Anchors.Insert(Index, Anchor);
        }
    }
}
